text, html, palmdoc used to segfault if the source was a magellan .wpt file
authorparkrrrr <parkrrrr@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 3 May 2004 23:00:56 +0000 (23:00 +0000)
committerparkrrrr <parkrrrr@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 3 May 2004 23:00:56 +0000 (23:00 +0000)
gpsbabel/html.c
gpsbabel/palmdoc.c
gpsbabel/text.c

index 8b32e5448895934af129a38662864f2fe4d2268d..41a71d886ae3fcc3d16d5bf5f46fdcde06aad29b 100644 (file)
@@ -116,7 +116,7 @@ html_disp(const waypoint *wpt)
                        xfree( hint );
                }
        }
-       else if (strcmp(wpt->notes,wpt->description)) {
+       else if (!wpt->notes && (!wpt->description || strcmp(wpt->notes,wpt->description))) {
                fprintf (file_out, "<p class=\"notes\">%s</p>\n", wpt->notes);
        }
        fprintf(file_out, "</td></tr></table>\n");
index e0a1faa93ce418f448431ea96eff4cb5dbf16249..da0416c113cbc121cfff894f7bed078fec76796f 100644 (file)
@@ -454,7 +454,7 @@ palmdoc_disp(const waypoint *wpt)
                        xfree( hint );
                }
        }
-       else if (strcmp(wpt->notes,wpt->description)) {
+       else if (wpt->notes && (!wpt->description || strcmp(wpt->notes,wpt->description))) {
                docprintf (10+strlen(wpt->notes), "%s\n", wpt->notes);
        }
        if (! suppresssep) 
index 180a9b977f5136711eb2968db7e603b0907ab9b1..6c17eb902457c26f544bf46138ee7de8e037c502 100644 (file)
@@ -109,7 +109,7 @@ text_disp(const waypoint *wpt)
                        xfree( hint );
                }
        }
-       else if (strcmp(wpt->notes,wpt->description)) {
+       else if (wpt->notes && (!wpt->description || strcmp(wpt->notes,wpt->description))) {
                fprintf (file_out, "%s\n", wpt->notes);
        }
        if (! suppresssep)